<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户登录</title>
    <link href="file/images/file" rel="shortcut icon" type="image/x-icon" />
    <link rel="stylesheet" type="text/css" href="./file/css/login.css"/>
</head>

<body style="background-image: url(file/images/2.jpg);">
<a href="index.html"><img src="file/images/11.png" title="首页" width="600px" height="700px"></a>


<div class="box">
    <h2>用户登录</h2>
<!--    <form>-->
<!--        <div class="inputBox">-->
<!--            <input type="text" name="nickname" id="nickname" required=""/><label>用户名</label>-->
<!--        </div>-->
<!--        <div class="inputBox">-->
<!--            <input type="password" name="pwd" id="pwd" required=""/><label>密码</label>-->
<!--        </div>-->
<!--        <input type="button" value="登录" onclick="loginPage()"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a-->
<!--            href="reg.html">免费注册</a>-->
<!--    </form>-->
    <form name="loginForm" id="loginForm" method="post" action="/login">
        <div class="inputBox">
            <input type="text" name="nickname" id="nickname" required=""/><label>用户名</label>
        </div>
        <div class="inputBox">
            <input type="password" name="pwd" id="pwd" required=""/><label>密码</label>
        </div>
        <div id="button-two">
            <button type="submit" value="登录" id="subLogin" class="btn btn-primary btn-lg" style="float: left;">登录</button>
            <!--        <input type="submit"  />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-->
            <a href="reg.html" class="btn btn-primary btn-lg active" role="button">注册</a>
        </div>

    </form>
</div>

<script src="file/js/jquery-3.4.1.min.js" type="text/javascript"></script>
<script type="text/javascript" src="file/js/jquery.form.min.js"></script>

<script>
    /*function loginPage() {
        let nickname = $("#nickname").val();
        let pwd = $("#pwd").val();

        $.ajax({
            url: "/login",
            type:"GET",
            data: {nickname: nickname,pwd: pwd},
            success: function (data) {
                console.log(data);
                if (data.code == 400) {
                    alert(data.message);
                    setTimeout(function () {
                        location.href = "index.html";
                    }, 2000);
                } else if (data.code == 200) {
                    alert(data.message);
                    return;
                } else {
                    alert("发生未知异常！");
                    return;
                }
            }
        });
    }*/

</script>
</body>
</html>
